package com.stormrage.entity.edu.rep;

import java.io.Serializable;

import com.stormragetech.core.util.DateUtil;
import com.stormrage.entity.edu.EduVideo;

public class EduVideoRep implements Serializable {

	// ------------------------------- Fields -------------------------------

	private static final long serialVersionUID = 7759094276346596298L;

	// ------------------------------- Fields -------------------------------

	private Integer seq;

	private Integer id;
	
	private Integer viewId;

	private String video;

	private String len;

	// ------------------------------- Fields -------------------------------

	public EduVideoRep() {
	}

	// ------------------------------- Fields -------------------------------

	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getViewId() {
		return viewId;
	}

	public void setViewId(Integer viewId) {
		this.viewId = viewId;
	}

	public String getVideo() {
		return video;
	}

	public void setVideo(String video) {
		this.video = video;
	}

	public String getLen() {
		return len;
	}

	public void setLen(String len) {
		this.len = len;
	}

	// ------------------------------- Fields -------------------------------

	public static EduVideoRep instance(EduVideo arg0, Integer arg1) {
		EduVideoRep entity = new EduVideoRep();
		entity.setSeq(arg1);
		entity.setId(arg0.getId());
		entity.setVideo(arg0.getVideo());
		entity.setLen(DateUtil.timeToStr(Long.valueOf(arg0.getVideoLen())));
		return entity;
	}

	@Override
	public String toString() {
		return this.getClass() + " : id - " + id + " video - " + video + " len - " + len;
	}

}
